Part Number Hot Search : 
661AC 3120C 08140 161302 2SK694 MB662XXX MB88346L OMT1606
Product Description
Full Text Search
 

To Download DS83C52007 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  1 of 43 rev: 022207 note: some revisions of this device may incor porate deviations from published s pecifications known as errata. multiple revisions of any device may be simultaneously available through various sales channel s. for information about device errata, click here: www.maxim-ic.com/errata . features ? 80c52 compatible 8051 pin- and instruction-set compatible four 8-bit i/o ports three 16-bit timer/counters 256 bytes scratchpad ram ? large on-chip memory 16kb program memory 1kb extra on-chip sram for movx ? romsize feature selects internal rom size from 0 to 16kb allows access to entire external memory map dynamically adjustable by software useful as boot block for external flash ? high-speed architecture 4 clocks/machine cycle (8051 = 12) runs dc to 33mhz clock rates single-cycle instruction in 121ns dual data pointer optional variable length movx to access fast/slow ram/peripherals ? power management mode programmable clock source to save power cpu runs from (crystal/64) or (crystal/1024) provides automatic hardware and software exit ? emi reduction mode disables ale ? two full-duplex hardware serial ports ? high integration controller includes : power-fail reset early-warning power-fail interrupt programmable watchdog timer ? 13 interrupt sources with six external ? available in 40-pin pdip, 44-pin plcc, 44-pin tqfp, and 40-pin windowed cerdip ? factory mask ds83c520 or eprom (otp) ds87c520 pin configurations ds87c520/ds83c520 eprom/rom high-speed microcontroller s www.maxim-ic.com top view the high-speed microcontroller user?s guide must be used in conjunction with this data sheet. download it at: www.maxim-ic.com/microcontrollers .
ds87c520/ds83c520 eprom/rom high-speed microcontrollers 2 of 43 ordering information part temp range max clock speed (mhz) pin-package ds87c520 -mcl 0 ?c to +70 ? c 33 40 plastic dip ds87c520-mcl+ 0 ?c to +70 ? c 33 40 plastic dip ds87c520-qcl 0 ?c to +70 ? c 33 44 plcc ds87c520-qcl+ 0 ?c to +70 ? c 33 44 plcc ds87c520-ecl 0 ?c to +70 ? c 33 44 tqfp ds87c520-ecl+ 0 ?c to +70 ? c 33 44 tqfp ds87c520-mnl -40 ?c to +85 ? c 33 40 plastic dip ds87c520-mnl+ -40 ?c to +85 ? c 33 40 plastic dip ds87c520-qnl -40 ?c to +85 ? c 33 44 plcc ds87c520-qnl+ -40 ?c to +85 ? c 33 44 plcc ds87c520-enl -40 ?c to +85 ? c 33 44 tqfp ds87c520-enl+ -40 ?c to +85 ? c 33 44 tqfp ds87c520-wcl* 0 ?c to +70 ? c 33 40 windowed cerdip ds83c520 -mcl 0 ?c to +70 ? c 33 40 plastic dip ds83c520-mcl+ 0 ?c to +70 ? c 33 40 plastic dip ds83c520-qcl 0 ?c to +70 ? c 33 44 plcc ds83c520-qcl+ 0 ?c to +70 ? c 33 44 plcc ds83c520-ecl 0 ?c to +70 ? c 33 44 tqfp ds83c520-ecl+ 0 ?c to +70 ? c 33 44 tqfp ds83c520-mnl -40 ?c to +85 ? c 33 40 plastic dip ds83c520-mnl+ -40 ?c to +85 ? c 33 40 plastic dip ds83c520-qnl -40 ?c to +85 ? c 33 44 plcc ds83c520-qnl+ -40 ?c to +85 ? c 33 44 plcc ds83c520-enl -40 ?c to +85 ? c 33 44 tqfp ds83c520-enl+ -40 ?c to +85 ? c 33 44 tqfp + denotes a lead(pb)-free/rohs-compliant device. * the windowed ceramic dip package is intrinsically lead(pb) free.
ds87c520/ds83c520 eprom/rom high-speed microcontrollers 3 of 43 description the ds87c520/ds83c520 eprom/rom high-speed mi crocontrollers are fast 8051-compatible microcontrollers. they feature a rede signed processor core without wast ed clock and memory cycles. as a result, the devices execute every 8051 instruction between 1.5 and 3 times faster than the original for the same crystal speed. typical applications will see a speed improvement of 2.5 times using the same code and the same crystal. the ds87c520/ds83c 520 offer a maximum crystal speed of 33mhz, resulting in apparent execution sp eeds of 82.5mhz (appr oximately 2.5x). the ds87c520/ds83c520 are pin compatible with all th ree packages of the standard 8051, and include standard resources such as three ti mer/counters, serial port, and four 8-bit i/o ports. they feature 16kb of eprom or mask rom with an extra 1kb of da ta ram. both otp and windowed packages are available. besides greater speed, the microcontroller includes a second full hardware serial port, seven additional interrupts, programmable watchdog timer, brownout m onitor, and power-fail re set. the device also provides dual data pointers (dptrs) to speed block data memory moves. it also can adjust the speed of movx data memory access from two to nine machine cycl es for flexibility in selecting external memory and peripherals. a new power management mode (pmm) is useful for por table applications. this feature allows software to select a lower speed clock as the main time base . while normal operation has a machine cycle rate of 4 clocks per cycle, the pmm runs the processor at 64 or 1024 clocks per cycle. for example, at 12mhz, standard operation has a machine cy cle rate of 3mhz. in power management mode, software can select either 187.5khz or 11.7khz machine cycle rate. there is a corresponding reduction in power consumption when the processor runs slower. the emi reduction feature allows software to select a reduced emission mode. this disables the ale signal when it is unneeded. the ds83c520 is a factory mask rom version of the ds87c520 designed fo r high-volume, cost- sensitive applications. it is iden tical in all respects to the ds87c 520, except that the 16kb of eprom is replaced by a user-supplied application program. all refe rences to features of the ds87c520 will apply to the ds83c520, with the exception of eprom-specific fe atures where noted. please contact your local dallas semiconductor sales representative for ordering information .
ds87c520/ds83c520 eprom/rom high-speed microcontrollers 4 of 43 figure 1. block diagram pin description pin dip plcc tqfp name function 40 44 38 v cc positive supply voltage. +5v 20 1, 22, 23 16, 17, 39 gnd digital circuit ground 9 10 4 rst reset input. the rst input pin contains a schmitt voltage input to recognize external active high reset inputs. the pin also employs an internal pulldown resistor to allow for a combination of wired or external reset sources. an rc is not required for power-up, as the device provides this function internally. 18 20 14 xtal2 19 21 15 xtal1 crystal oscillator pins. xtal1 and xtal2 provide support for parallel-resonant, at-cut crystals. xtal1 acts also as an input if there is an external clock source in place of a crystal. xtal2 serves as the output of the crystal amplifier. 29 32 26 psen program store-enable output. this active-low signal is commonly connected to optional ex ternal rom memory as a chip enable. psen provides an active-low pulse and is driven high when external rom is not being accessed. ds87c520/ ds83c520
ds87c520/ds83c520 eprom/rom high-speed microcontrollers 5 of 43 pin description (continued) pin dip plcc tqfp name function 30 33 27 ale address latch enable output . the ale functions as a clock to latch the external address lsb from the multiplexed address/data bus on port 0. this signal is commonly connected to the latch enable of an external 373 family transparent latch. ale has a pulse width of 1.5 xtal1 cycles and a period of fo ur xtal1 cycles. ale is forced high when the ds87c520/ds83c520 are in a reset condition. ale can also be disabled and forced high by writing aleoff = 1 (pmr.2). ale operates independently of aleoff during external memory accesses. 39 43 37 p0.0 (ad0) 38 42 36 p0.1 (ad1) 37 41 35 p0.2 (ad2) 36 40 34 p0.3 (ad3) 35 39 33 p0.4 (ad4) 34 38 32 p0.5 (ad5) 33 37 31 p0.6 (ad6) 32 36 30 p0.7 (ad7) port 0 (ad0?7), i/o . port 0 is an open-drain, 8-bit, bidirectional i/o port. as an alternate function port 0 can function as the multiplexed address/data bus to access off-chip memory. during the time when ale is high, the lsb of a memory address is presented. when ale falls to a logic 0, the port transitions to a bidirectional data bus. this bus is used to read external rom and read/write external ram memory or peripherals. when used as a memory bus, the port provides active high driv ers. the reset condition of port 0 is tri-state. pullup resistors are required when using port 0 as an i/o port. 1 2 40 p1.0 2 3 41 p1.1 3 4 42 p1.2 4 5 43 p1.3 5 6 44 p1.4 6 7 1 p1.5 7 8 2 p1.6 8 9 3 p1.7 port 1, i/o . port 1 functions as both an 8-bit, bidirectional i/o port and an alternate functional interface for timer 2 i/o, new external interrupts, and new serial port 1. the reset condition of port 1 is with all bits at a logic 1. in this stat e, a weak pullup holds the port high. this condition also serves as an input state; a weak pullup holds the port high. this condition also serves as an input mode, since any external circuit that writes to the port will overcome the weak pullup. when software writes a 0 to any port pin, the ds87c520/ds83c520 will activate a strong pulldown that remains on until either a 1 is written or a reset occurs. writing a 1 after the port has been at 0 will cause a strong transition driver to turn on, followed by a weaker sustaining pullup. once the momentary strong driver turns off, the port again becomes the output high (and input) state. the alternate modes of port 1 are out-lines as follows. port alternate function p1.0 t2 external i/o for timer/counter 2 p1.1 t2ex ex timer/counter 2 capture/reload trigger p1.2 rxd1 serial port 1 input p1.3 txd1 serial port 1 output p1.4 int2 external interrupt 2 (positive edge detect) p1.5 int3 external interrupt 3 (negative edge detect) p1.6 int4 external interrupt 4 (positive edge detect) p1.7 int5 external interrupt 5 (negative edge detect)
ds87c520/ds83c520 eprom/rom high-speed microcontrollers 6 of 43 pin description (continued) pin dip plcc tqfp name function 21 24 18 p2.0 (a8) 22 25 19 p2.1 (a9) 23 26 20 p2.2 (a10) 24 27 21 p2.3 (a11) 25 28 22 p2.4 (a12) 26 29 23 p2.5 (a13) 27 30 24 p2.6 (a14) 28 31 25 p2.7 (a15) port 2 (a8?15), i/o . port 2 is a bidirectional i/o port. the reset condition of port 2 is logic high. in this state, a weak pullup holds the port high. this condition also serves as an input mode, since any external circuit that writes to the port will overcome the weak pullup. when software writes a 0 to any port pin, the ds87c520/ds83c520 will activate a strong pulldown that remains on until either a 1 is written or a reset occurs. writing a 1 after the port has been at 0 will cau se a strong transition driver to turn on, followed by a weaker sustaining pullup. once the momentary strong driver turns off, the port again becomes both the output high and input state. as an alternate function port 2 can function as msb of the external ad dress bus. this bus can be used to read external rom and read/write external ram memory or peripherals. 10 11 5 p3.0 11 13 7 p3.1 12 14 8 p3.2 13 15 9 p3.3 14 16 10 p3.4 15 17 11 p3.5 16 18 12 p3.6 17 19 13 p3.7 port 3, i/o. port 3 functions as both an 8-bit, bidirectional i/o port and an alternate functional interface for external interrupts, serial port 0, timer 0 and 1 inputs, and rd and wr strobes. the reset condition of port 3 is with all bits at a logic 1. in this state, a weak pullup holds the port high. th is condition also serves as an input mode, since any external circuit that writes to the port will overcome the weak pullup. when software writes a 0 to any port pin, the ds87c520/ds83c520 will activate a strong pulldown that remains on until either a 1 is written or a reset occurs. writing a 1 after the port has been at 0 will cau se a strong transition driver to turn on, followed by a weaker sustaining pullup. once the momentary strong driver turns off, the port again becomes both the output high and input state. the alternate modes of port 3 are outlined below. port alternate mode p3.0 rxd0 serial port 0 input p3.1 txd0 serial port 0 output p3.2 int0 external interrupt 0 p3.3 int1 external interrupt 1 p3.4 t0 timer 0 external input p3.5 t1 timer 1 external input p3.6 wr external data memory write strobe p3.7 rd external data memory read strobe 31 35 29 ea external access input, active low. connect to ground to force the ds87c520/ds83c520 to use an external rom. the internal ram is still accessible as determined by register settings. connect ea to v cc to use internal rom. ? 12, 34 6, 28 n.c. not connected. these pins should not be connected. they are reserved for use with future devices in this family.
ds87c520/ds83c520 eprom/rom high-speed microcontrollers 7 of 43 compatibility the ds87c520/ds83c520 are fully static cmos 8051-co mpatible microcontrollers designed for high performance. in most cases, the ds87c520/ds83c520 can drop into an existing socket for the 8xc51 family to improve the operation significantly. while remaining familiar to 8051 family users, the devices have many new features. in genera l, software written for existing 8051-based systems works without modification on the ds87c520/ds83c520. the exception is critical timing since the high-speed microcontrollers performs instructions much faster than the original for any given crystal selection. the ds87c520/ds83c520 run the standard 8051 family instru ction set and are pin co mpatible with dip, plcc, or tqfp packages. the ds87c520/ds83c520 provide three 16-bit timer/counter s, full-duplex serial port (2), 256 bytes of direct ram plus 1kb of extra movx ram. i/o por ts have the same operation as a standard 8051 product. timers will default to a 12-clock per cycle operation to keep their timing compatible with original 8051 family systems. however, timers are individually programmable to run at the new four clocks per cycle if desired. the pca is not supported. the ds87c520/ds83c520 provide several new hardware features implemented by new special function registers. a summary of th ese sfrs is provided below. performance overview the ds87c520/ds83c520 feature a high- speed 8051-compatible core. higher speed comes not just from increasing the clock frequency but also from a newer, more efficient design. this updated core does not have the dummy memory cycles that are present in a standard 8051. a conventional 8051 generates machine cycles usi ng the clock frequency divided by 12. in the ds87c520/ds83c520, the same machine cycle takes 4 cl ocks. thus the fastest instruction, 1 machine cycle, executes three times faster for the same crystal frequency. note that these are identical instructions. the majority of instructions on the ds87c520/ds 83c520 will see the full 3-to-1 speed improvement. some instructions will ge t between 1.5 and 2.4 to 1 improvement. all instructions are faster than the original 8051. the numerical average of all opcodes gives approxim ately a 2.5 to 1 speed improvement. improvement of individual programs will depend on the actual instructi ons used. speed-sensitive applications would make the most use of instructions that are three times faster. however, the sheer number of 3 to 1 improved opcodes makes dramatic speed improvements likely for any code. these architecture improvements produce a peak instruc tion cycle in 121ns (8.25 mips). the dual data pointer feat ure also allows the user to eliminate wasted instructions when moving blocks of memory. instruction set summary all instructions perform the same functions as their 8051 c ounterparts. their effect on bits, flags, and other status functions is identical. however, the timing of each instruc tion is different. this applies both in absolute and relative number of clocks. for absolute timing of real-time even ts, the timing of software loops can be calculated using a table in the high-speed microcontroller user?s guide . however, counter/timers default to run at the older 12 clocks per increment. in this way, timer-based events occur at the standard intervals with software executing at higher speed. timers optionally can r un at 4 clocks per increment to ta ke advantage of faster processor operation.
ds87c520/ds83c520 eprom/rom high-speed microcontrollers 8 of 43 the relative time of two instructions might be different in the new archit ecture than it was previously. for example, in the original architecture, the ?movx a, @dptr? instruction and the ?mov direct, direct? instruction used two machine cycles or 24 oscillator cycles. therefore, they required the same amount of time. in the ds87c520/ds83c520, the movx instruction take s as little as two machine cycles or eight oscillator cycles but the ?mov direct, direct? uses three machine cycles or 12 oscillator cycles. while both are faster than their original counterparts, they now have differe nt execution times. this is because the ds87c520/ds83c520 usually use one instruction cy cle for each instruction byte. the user concerned with precise program timing should examine the timing of each instruction for familiarity with the changes. note that a machine cycl e now requires just 4 clocks, and pr ovides one ale pulse per cycle. many instructions requir e only one cycle, but some require five. in the original architecture, all were one or two cycles except for mul and div. refer to the high-speed microcontroller user?s guide for details and individua l instruction timing. special function registers special function registers (sfrs) control most special features of th e ds87c520/ds83c520. this allows the ds87c520/ds83c520 to have many new features but use the same instruction set as the 8051. when writing software to use a new feature, an equa te statement defines the sfr to an assembler or compiler. this is the only change needed to access the new function. the ds87c520/ds83c520 duplicate the sfrs containe d in the standard 80c52. table 1 shows the regist er addresses and bit locations. t he high-speed microcontroller user?s guide describes all sfrs.
ds87c520/ds83c520 eprom/rom high-speed microcontrollers 9 of 43 table 1. special function register locations register bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 address p0 p0.7 p0.6 p0.5 p0.4 p0.3 p0.2 p0.1 p0.0 80h sp 81h dpl 82h dph 83h dpl1 84h dph1 85h dps 0 0 0 0 0 0 0 sel 86h pcon smod_0 smod0 ? ? gf1 gf0 stop idle 87h tcon tf1 tr1 tf0 tr0 ie1 it1 ie0 it0 88h tmod gate c/ t m1 m0 gate c/ t m1 m0 89h tl0 8ah tl1 8bh th0 8ch th1 8dh ckcon wd1 wd0 t2m t1m t0m md2 md1 md0 8eh port1 p1.7 p1.6 p1.5 p1.4 p1.3 p1.2 p1.1 p1.0 90h exif ie5 ie4 ie3 ie xt/ rg rgmd rgsl bgs 91h scon0 sm0/fe_0 sm1_0 sm2_0 ren_0 tb8_0 rb8_0 ti_0 ri_0 98h sbuf0 99h p2 p2.7 p2.6 p2.5 p2.4 p2.3 p2.2 p2.1 p2.0 a0h ie ea es1 et2 es0 et1 ex1 et0 ex0 a8h saddr0 a9h saddr1 aah p3 p3.7 p3.6 p3.5 p3.4 p3.3 p3.2 p3.1 p3.0 b0h ip ? ps1 pt2 ps0 pt1 px1 pt0 px0 b8h saden0 b9h saden1 b a h scon1 sm0/fe_1 sm1_1 sm2_1 ren_1 tb8_1 rb8_1 ti_1 r1_1 c0h sbuf1 sb7 sb6 sb5 sb4 sb3 sb2 sb1 sb0 c1h romsize ? ? ? ? ? rms2 rms1 rms0 c2h pmr cd1 cd0 swb ? xtoff aleoff dme1 dme0 c4h status pip hip lip xtup spta1 spta1 spta0 spra0 c5h ta c7h t2con tf2 exf2 rclk tclk exen2 tr2 c/ t2 c/ rl2 c8h t2mod ? ? ? ? ? ? t2oe dcen c9h rcap2l c a h rcap2h cbh tl2 cch th2 c d h psw cy ac f0 rs1 rs0 ov fl p d0h wdcon smod_1 por epfi pfi wdif wtrf ewt rwt d8h acc e0h eie ? ? ? ewdi ex5 ex4 ex3 ex2 e8h b f0h eip ? ? ? pwdi px5 px4 px3 px2 f8h note: new functions are in bold.
ds87c520/ds83c520 eprom/rom high-speed microcontrollers 10 of 43 memory resources like the 8051, the ds87c520/ds83c520 use three memory areas. the total memory configuration of the ds87c520/ds83c520 is 16kb of rom, 1kb of data sram and 256 bytes of scratchpad or direct ram. the 1kb of data space sram is read/write accessi ble and is memory mapped. this on-chip sram is reached by the movx instruction. it is not used for executable memory. the scratchpad area is 256 bytes of register mapped ram and is id entical to the ram found on the 80c 52. there is no conflict or overlap among the 256 bytes and the 1kb as they use differe nt addressing modes and separate instructions. operational consideration the erasure window of the windowed cerdip should be covered without regard to the programmed/unprogrammed state of the eprom. otherw ise, the device may not meet the ac and dc parameters listed in the data sheet. program memory access on-chip rom begins at address 0000h and is con tiguous through 3fffh (16kb). exceeding the maximum address of on-chip rom will cause the device to access off-chip memory. however, the maximum on-chip decoded address is selectable by software using th e romsize feature. software can cause the ds87c520/ds83c520 to behave like a device w ith less on-chip memory. this is beneficial when overlapping external memory, such as flash, is used. the maximum memory size is dynamically variable. thus a portion of memory can be removed from the memory map to access off-chip memory, and then restored to access on-chip memory. in fact, all of the on-chip memory can be removed from the memory map allowing the full 64kb memory space to be addressed from off-chip memory. rom addresses that are larger than the selected maximum are automatically fetched from outside the part via ports 0 and 2. a depiction of th e rom memory map is shown in figure 2. the romsize regis ter is used to select the maxi mum on-chip decoded address for rom. bits rms2, rms1, rms0 have the following effect. rms2 rms1 rms0 maximum on-chip rom address 0 0 0 0kb 0 0 1 1kb/03ffh 0 1 0 2kb/07ffh 0 1 1 4kb/0fffh 1 0 0 8kb/1fffh 1 0 1 16kb (default)/3fffh 1 1 0 invalid?reserved 1 1 1 invalid?reserved the reset default condition is a maximum on-chip rom address of 16kb. thus no action is required if this feature is not used. when accessing external pr ogram memory, the first 16kb would be inaccessible. to select a smaller effective rom size, software must alter bits rms2?rms0. altering these bits requires a timed-access procedure as explained later. care should be taken so that ch anging the romsize register does not corrupt program execution. for example, assume that the ds87c520/ds83c520 are executing instructions from internal program memory near the 12kb boundary (~3000h) and that the ro msize register is currently configured for a
ds87c520/ds83c520 eprom/rom high-speed microcontrollers 11 of 43 16kb internal program space. if software reconfi gures the romsize register to 4kb (0000h?0fffh) in the current state, the device will immediately jump to external program execution because program code from 4kb to 16kb (1000h?3fffh) is no longer located on-chip. this could result in code misalignment and execution of an invalid instruction. the recomm ended method is to modify the romsize register from a location in memory that will be internal (or external) both befo re and after the operation. in the above example, the instruction which modifies the romsize register should be located below the 4kb (1000h) boundary, so that it will be unaffected by the memory modifi cation. the same precaution should be applied if the intern al program memory size is modified while executing from external program memory. off-chip memory is accessed using the multiplexed address/data bus on p0 and the msb address on p2. while serving as a memory bus, these pins are not i/o ports. this convention follows the standard 8051 method of expanding on-chip memory. off-chip rom access also occurs if the ea pin is a logic 0. ea overrides all bit settings. the psen signal goes active (low) to serve as a chip enable or output enable when ports 0 and 2 fetch from external rom. figure 2. rom memory map data memory access unlike many 8051 derivatives, the ds87c520/ds83c520 contain on-chi p data memory. they also contain the standard 256 bytes of ram accessed by di rect instructions. these areas are separate. the movx instruction accesses the on-chip data memory. although physically on-chip, software treats this area as though it was located off-chip. the 1kb of sram is between address 0000h and 03ffh. access to the on-chip data ram is optional under softwa re control. when enabled by software, the data sram is between 0000h and 03ffh. any movx instruc tion that uses this ar ea will go to the on-chip ram while enabled. movx addresses greater than 03ffh automatically go to external memory through ports 0 and 2. rom size ignored rom size adjustable default = 16kb
ds87c520/ds83c520 eprom/rom high-speed microcontrollers 12 of 43 when disabled, the 1kb memory area is transparent to the system memory map. any movx directed to the space between 0000h and ffffh goes to the expanded bus on ports 0 a nd 2. this also is the default condition. this default allows the ds87c520/ds83c520 to drop into an existing system that uses these addresses for other hardware and still have full compatibility. the on-chip data area is software se lectable using 2 bits in the powe r management register at location c4h. this selection is dyna mically programmable. thus access to the on -chip area becomes transparent to reach off-chip devices at the same addresses. th e control bits are dme1 (pmr.1) and dme0 (pmr.0). they have the following operation: table 2. data memory access control dme1 dme0 data memory address memory function 0 0 0000h?ffffh external data memory ( default condition) 0000h?03ffh internal sram data memory 0 1 0400h?ffffh external data memory 1 0 reserved reserved 0000h?03ffh internal sram data memory 0400h?fffbh reserved?no external access fffch read access to the status of lock bits 1 1 fffdh?ffffh reserved?no external access notes on the status byte read at fffch with dme1, 0 = 1, 1: bits 2?0 reflect the programmed status of the security lock bits lb2?lb0. they are individually set to a logic 1 to correspond to a s ecurity lock bit that has been programmed. these status bits allow software to verify that the part has been locked before running if desired. the bits are read only. note: after internal movx sram has been initialize d, changing the dme0/1 bits has no effect on the contents of the sram. stretch memory cycle the ds87c520/ds83c520 allow software to adjust th e speed of off-chip data memory access. the microcontrollers can perform the movx in as few as two instruction cycles. the on-chip sram uses this speed and any movx instructi on directed internally uses two cycles. however, the time can be stretched for interface to external devices. this allo ws access to both fast memory and slow memory or peripherals with no glue logic. even in high-speed systems, it may not be necessary or desirable to perform off-chip data memory access at full speed. in addition, there are a va riety of memory-mapped peripherals such as lcds or uarts that are slow. the stretch movx is controlled by the clock control regist er at sfr location 8eh as described below. it allows the user to select a stretch value betwee n 0 and 7. a stretch of 0 will result in a two-machine cycle movx. a stretch of 7 will result in a movx of nine machine cycles. software can dynamically change this value depending on the particular memory or peripheral. on reset, the stretch value will de fault to a 1, resulting in a three- cycle movx for any external access. therefore, off-chip ram access is not at full speed. this is a conveni ence to existing designs that may not have fast ram in place. intern al sram access is always at full speed regardless of the stretch
ds87c520/ds83c520 eprom/rom high-speed microcontrollers 13 of 43 setting. when desiring maximum speed, software shoul d select a stretch value of 0. when using very slow ram or peripherals, select a la rger stretch value. note that this affects data memory only and the only way to slow program memory (rom ) access is to use a slower crystal. using a stretch value between 1 and 7 causes the microc ontroller to stretch the r ead/write strobe and all related timing. also, setup and hold tim es are increased by 1 clock when using any stretch greater than 0. this results in a wider read/write strobe an d relaxed interface timing, allowing more time for memory/peripherals to respond. the timing of the variable speed movx is in the electrical specifications section. table 3 shows the resulting strobe widt hs for each stretch value. the m emory stretch uses the clock control special function re gister at sfr location 8eh. the stretch value is selected using bits ckcon.2?0. in the table, these bits are referred to as m2 through m0. the first stretch (default) allows the use of common 120ns rams without dramatically lengthening the memory access. table 3. data memory cycle stretch values ckcon.2-0 m2 m1 m0 memory cycles rd or wr strobe width in clocks strobe width time at 33mhz (ns) 0 0 0 2 (forced internal) 2 60 0 0 1 3 (default external) 4 121 0 1 0 4 8 242 0 1 1 5 12 364 1 0 0 6 16 485 1 0 1 7 20 606 1 1 0 8 24 727 1 1 1 9 28 848 dual data pointer the timing of block moves of data memory is faster using the dual data poin ter (dptr). the standard 8051 dptr is a 16-bit value that is used to address off-chip da ta ram or peripherals. in the ds87c520/ds83c520, this data pointer is called dptr0, located at sfr addresses 82h and 83h. these are the original locations. using dptr requires no m odification of standard c ode. the new dptr at sfr 84h and 85h is called dptr1. the dptr select bit (dps) chooses the active point er. its location is the lsb of the sfr location 86h. no other bits in regist er 86h have any effect and are 0. the user switches between data pointers by toggling the lsb of register 86h. the increment (inc) instruction is the fastest way to accomplish this. all dptr-related instructions use the currently selected dptr for any activity. therefore it takes only one instruc tion to switch from a source to a destination address. using the dual data pointer saves code from needing to save sour ce and destination addresse s when doing a block move. the software simply switches between dptr0 and 1 once software loads them. the relevant register locations are as follows: dpl 82h low byte original dptr dph 83h high byte original dptr dpl1 84h low byte new dptr dph1 85h high byte new dptr dps 86h dptr select (lsb)
ds87c520/ds83c520 eprom/rom high-speed microcontrollers 14 of 43 power management along with the standard idle and power down (stop) mode s of the standard 80c52, the ds87c520/ds83c520 provide a new power management mode. this mode allows the processor to continue functioning, yet to save power compared with full operation. the ds87c520/ds83c520 also feature several enhancements to st op mode that make it more useful. power management mode (pmm) power management mode offers a complete scheme of reduced internal clock speeds that allow the cpu to run software but to use substantially less power. during default operation, the ds87c520/ds83c520 use four clocks per machine cycle. thus the instru ction cycle rate is clock/4. at 33mhz crystal speed, the instruction cycle speed is 8.25mhz (33/4). in pmm, the microcontrolle r continues to ope rate but uses an internally divided version of the clock source. this creates a lower power st ate without external components. it offers a choice of two reduced instru ction cycle speeds (and two clock sources - discussed below). the speeds are (clo ck/64) and (clock/1024). software is the only mechanism to invoke the pmm. table 4 illustrates the instruction cycle rate in pmm for several comm on crystal frequencie s. since power consumption is a direct function of operating speed, pmm 1 eliminates most of the power consumption wh ile still allowing a reasonable speed of processing. pmm 2 runs very slow and provides the lowest power consumption without stopp ing the cpu. this is illustrated in table 5. note tha t pmm provides a lower power condition than idle mode. this is because in idle mode, all clocked functions such as ti mers run at a rate of crystal divided by 4. since wake-up from pmm is as fast as or faster than from idle, and pmm allows the cpu to operate (even if doing nops), there is little reason to use idle mode in new designs. table 4. machine cycle rate crystal speed (mhz) full operation (4 clocks) (mhz) pmm1 (64 clocks) (khz) pmm2 (1024 clocks) (khz) 11.0592 2.765 172.8 10.8 16 4.00 250.0 15.6 25 6.25 390.6 24.4 33 8.25 515.6 32.2 table 5. typical operating current in pmm crystal speed (mhz) full operation (4 clocks) (ma) pmm1 (64 clocks) (ma) pmm2 (1024 clocks) (ma) 11.0592 13.1 5.3 4.8 16 17.2 6.4 5.6 25 25.7 8.1 7.0 33 32.8 9.8 8.2
ds87c520/ds83c520 eprom/rom high-speed microcontrollers 15 of 43 crystal-less pmm a major component of power consumption in pmm is the crystal amplifier circuit. the ds87c520/ds83c520 allow the user to switch cpu operati on to an internal ring oscillator and turn off the crystal amplifier. the cpu would then have a cl ock source of approximately 2mhz to 4mhz, divided by either 4, 64, or 1024. the ring is not accurate, so software cannot perform precision timing. however, this mode allows an additional saving of between 0.5ma and 6.0ma, depending on the actual crystal frequency. while this saving is of l ittle use when runni ng at 4 clocks per instruction cy cle, it makes a major contribution when running in pmm1 or pmm2. pmm operation software invokes the pmm by setting the appropriate bits in the sfr area. the basic choices are divider speed and clock source. there are th ree speeds (4, 64, and 1024) and two clock sources (cry stal and ring). both the decisions and the controls are separate. softwa re will typically select th e clock speed first. then, it will perform the switch to ring operat ion if desired. lastly, software ca n disable the crystal amplifier if desired. there are two ways of exiting pmm. software can re move the condition by reversing the procedure that invoked pmm or hardware can (opti onally) remove it. to resume ope ration at a divide -by-4 rate under software control, simply select 4 clocks per cycle, then crystal- based operation if relevant. when disabling the crystal as the time base in favor of the ring oscillator, there are timing restrictions associated with restarting the cr ystal operation. details are described below. there are three registers containing bits that are concerned with pmm functions. they are power management register (pmr; c4h), status (status; c5h), and external interrupt flag (exif; 91h). clock divider software can select the instruction cycle rate by selecting bits cd1 (pmr .7) and cd0 (pmr.6) as follows: cd1 cd0 cycle rate 0 0 reserved 0 1 4 clocks (default) 1 0 64 clocks 1 1 1024 clocks the selection of instruction cycle rate will take effect after a delay of one instruction cycle. note that the clock divider choice applies to all functions incl uding timers. since baud rates are altered, it will be difficult to conduct serial communication while in pmm. there are minor restrictions on accessing the clock selection bits. the processor must be running in a 4-clock state to select either 64 (pmm1) or 1024 (pmm2) clocks. this means software cannot go direc tly from pmm1 to pmm2 or visa versa. it must return to a 4-clock rate first.
ds87c520/ds83c520 eprom/rom high-speed microcontrollers 16 of 43 switchback to return to a 4-clock rate from pmm, software can simply select the cd1 and cd0 clock control bits to the 4 clocks per cycle state. however, the ds87c 520/ds83c520 provide several hardware alternatives for automatic switchback. if switchback is enabled, then the device will automatica lly return to a 4-clock per cycle speed when an interrupt occurs from an enabled, valid external interrupt source. a switchback will also occur when a uart detects the beginning of a se rial start bit if the serial receiver is enabled (ren = 1). note the beginning of a st art bit does not generate an interr upt; this occurs on reception of a complete serial word. the automatic switchback on detection of a start bit allows hardware to correct baud rates in time for a proper serial reception. a switchback will also occur when a byte is written to sbuf0 or sbuf1 for transmission. switchback is enabled by setting the swb bit (pmr.5) to a 1 in software. for an external interrupt, switchback will occur only if the interrupt source coul d really generate the interrupt. for example, if int0 is enabled but has a low priority se tting, then switchback will not occur on int0 if the cpu is servicing a high priority interrupt. status information in the status register assists decisions about switching into pmm. this register contains information about the level of active interrupts and the ac tivity on the serial ports. the ds87c520/ds83c520 support three levels of interrupt priority. these levels are power-fail, high, and low. bits status.7-5 indicate the service status of each level. if pip (pow er-fail interrupt priority; status. 7) is a 1, then the processor is servicing th is level. if either hip (high interrupt priority; status.6) or lip (low interrupt priority; status.5) is high, then the corresponding level is in service. software should not rely on a lower priority level interrupt source to remove pmm (sw itchback) when a higher level is in service. check the current priority service level before entering pmm. if the current service level locks out a desired switchback source, th en it would be advisable to wait until this condition clears before entering pmm. alternately, software can prevent an undesired exit fr om pmm by entering a low pr iority interrupt service level before entering pmm. this will prevent othe r low priority interrupts from causing a switchback. status also contains information about the state of the serial ports . serial port 0 receive activity (spra0;status.0) indicates a serial word is being received on serial port 0 when this bit is set to a 1. serial port 0 transmit activity (spt a0; status.1) indicates that the se rial port is still shifting out a serial transmission. status.2 and status.3 provide the same info rmation for serial port 1, respectively. these bits should be interrogated before entering pmm1 or pmm2 to ensure that no serial port operations are in progress. changing the clock di visor rate during a serial transmission or reception will corrupt the operation.
ds87c520/ds83c520 eprom/rom high-speed microcontrollers 17 of 43 crystal/ring operation the ds87c520/ds83c520 allow software to choose the cl ock source as an independent selection from the instruction cycle rate. the user can select cr ystal-based or ring oscillator-based operation under software control. power-on reset default is the crys tal (or external clock) source. the ring may save power depending on the actual crystal speed. to save still more power, software can then disable the crystal amplifier. this process requires two steps. reversing the process al so requires two steps. the xt/ rg bit (exif.3) selects the crystal or ring as the clock source. setting xt/ rg = 1 selects the crystal. setting xt/ rg = 0 selects the ring. the rgmd (exif.2) bi t serves as a status bit by indicating the active clock source. rgmd = 0 indicates the cpu is running from the crystal. rgmd = 1 indicates it is running from the ring. when operating from the ring, disable the crystal amplifier by setting the xtoff bit (pmr.3) to 1. this can only be done when xt/ rg = 0. when changing the clock source, the selection will take effect after a one-instruction cycle delay. this applies to changes from crystal to ri ng and vise versa. however, this assumes that the crystal amplifier is running. in most cases, when the ring is active, software previously disabl ed the crystal to save power. if ring operation is being used and the system must switch to crystal operation, th e crystal must first be enabled. set the xtoff bit to 0. at this time, the crystal oscillation will begin. the ds87c520/ds83c520 then provide a warm -up delay to make certain th at the frequency is stable. hardware will set the xtup bit (status.4) to a 1 wh en the crystal is ready for use. then software should write xt/ rg to 1 to begin operating from the cr ystal. hardware prevents writing xt/ rg to 1 before xtup=1. the delay between xtoff = 0 and xt up = 1 will be 65,536 crystal clocks in addition to the crystal cycle startup time. switchback has no effect on the clock source. if software selects a redu ced clock divider and enables the ring, a switchback will only restore the divider spee d. the ring will remain as the time base until altered by software. if there is serial activity, switchback usually occurs with enough time to create proper baud rates. this is not true if the crystal is off and the cpu is running from the ring. if sending a serial character that wakes the system from crystal-less pmm, then it should be a dummy character of no importance with a subsequent delay for crystal startup. figure 3 illustrates a typical deci sion set associated with pmm. table 6 is a summary of the bits relating to pmm and its operation.
ds87c520/ds83c520 eprom/rom high-speed microcontrollers 18 of 43 table 6. pmm control and status bit summary bit location function reset write access xt/ rg exif.3 control. xt/ rg = 1, runs from crystal or external clock; xt/ rg = 0, runs from internal ring oscillator. x 0 to 1 only when xtup = 1 and xtoff = 0 rgmd exif.2 status. rgmd = 1, cpu clock = ring; rgmd = 0, cpu clock = crystal. 0 none cd1, cd0 pmr.7, pmr.6 control. cd1, 0 = 01, 4 clocks; cs1, 0 = 10, pmm1; cd1, 0 = 11, pmm2. 0, 1 write cd1, 0 = 10 or 11 only from cd1, 0 = 01 swb pmr.5 control. swb = 1, hardware invokes switchback to 4 clocks, swb = 0, no hardware switchback. 0 unrestricted xtoff pmr.3 control. disables crystal operation after ring is selected. 0 1 only when xt/ rg = 0 pip status.7 status. 1 indicates a power-fail interrupt in service . 0 none hip status.6 status. 1 indicates high priority interrupt in service. 0 none lip status.5 status. 1 indicates low pr iority interrupt in service. 0 none xtup status.4 status. 1 indicates th at the crystal has stabilized. 1 none spta1 status.3 status. serial transmission on serial port 1. 0 none spra1 status.2 status. se rial word reception on serial port 1. 0 none spta0 status.1 status. serial transmission on serial port 0. 0 none spra0 status.0 status. se rial word reception on serial port 0. 0 none
ds87c520/ds83c520 eprom/rom high-speed microcontrollers 19 of 43 figure 3. invoking and clearing pmm
ds87c520/ds83c520 eprom/rom high-speed microcontrollers 20 of 43 idle mode setting the lsb of the power control register (pcon; 87h) invokes the idle mode. idle will leave internal clocks, serial ports and timers running. power consum ption drops because the cp u is not active. since clocks are running, the idle power consumption is a function of crystal frequency. it should be approximately one-half the operational power at a given frequency. the cpu can exit the idle state with any interrupt or a reset. idle is available for back ward software compatibility. the system can now reduce power consumption to below idle levels by using pmm1 or pmm2 and running nops. stop mode enhancements setting bit 1 of the power control re gister (pcon; 87h) invokes the stop mode. stop mode is the lowest power state since it turns off all internal clocking. the i cc f a standard stop mode is approximately 1 ? a (but is specified in the electrical specifications). the cpu will exit st op mode from an eternal interrupt or a reset condition. internally generated interrupt s (timer, serial port, watchdog) are not useful since they require clocking activity. the ds87c520/ds83c520 provide two enhancements to the stop mode. as documented below, the device provides a bandgap reference to determine powe r-fail interrupt and reset thresholds. the default state is that the bandgap reference is off while in stop mode. this a llows the extremely low-power state mentioned above. a user can optionally choose to ha ve the bandgap enabled during stop mode. with the bandgap reference enabled, pfi and power-fail reset are functional and are a valid means for leaving stop mode. this allows software to detect and compensate for a br ownout or power supply sag, even when in stop mode. in stop mode with the bandgap enabled, i cc will be approximately 50 ? a compared with 1 ? a with the bandgap off. if a us er does not require a power-fail reset or interrupt while in stop mode, the bandgap can remain disabled. only the most power-sensitive applications should turn off the bandgap, as this results in an uncontrolled power-down condition. the control of the bandgap reference is located in the extended interrupt flag register (exif; 91h). setting bgs (exif.0) to a 1 will keep the bandgap reference enabled during stop mode. the default or reset condition is with the bit at a logic 0. this re sults in the bandgap being off during stop mode. note that this bit has no control of the referen ce during full power, pmm, or idle modes. the second feature allows an additi onal power saving option while also ma king stop easier to use. this is the ability to start instantly when exiting stop mode. it is the internal ring oscillator that provides this feature. this ring can be a clock source when exiting stop mode in response to an interrupt. the benefit of the ring oscillator is as follows. using stop mode turns off the crystal oscillator and all intern al clocks to save power . this requires that the oscillator be restarted when exiting stop mode. actual startup time is crystal-dependent, but is normally at least 4ms. a common recommendation is 10 ms. in an application th at will wake up, perform a short operation, then return to sleep, the crystal star tup can be longer than the real transaction. however, the ring oscillator will star t instantly. running from the ring, the us er can perform a simple operation and return to sleep before the crystal has even started. if a user selects the ring to provide th e startup clock and the processor remains running, hardware will automati cally switch to the crystal once a power-on reset interval (65,536 clocks) has expired. hardware uses this value to a ssure proper crystal start even though power is not being cycled. the ring oscillator runs at approximately 2mhz to 4mhz but will not be a precise value. do not conduct real-time precision operations (including seri al communication) dur ing this ring period. figure 3 shows
ds87c520/ds83c520 eprom/rom high-speed microcontrollers 21 of 43 how the operation would compare when using the ring, and when starting up normally. the default state is to exit stop mode without using the ring oscillator. the rgsl - ring select bit at exif.1 (exif; 91h) c ontrols this function. when rgsl = 1, the cpu will use the ring oscillator to exit st op mode quickly. as mentioned above , the processor will automatically switch from the ring to the crystal after a delay of 65,536 crystal clocks . for a 3.57mhz crystal, this is approximately 18ms. the processor sets a flag called rgmd-ring mode , located at exif.2, that tells software that the ring is being used. the bit will be a logic 1 when the ring is in use. attempt no serial communication or precision timing while this bit is set, since the operating fr equency is not precise. figure 4. ring o scillator exit from stop mode emi reduction one of the major contributors to ra diated noise in an 8051-based system is the toggling of ale. the microcontroller allows software to disable ale wh en not used by setting the aleoff (pmr.2) bit to 1. when aleoff = 1, ale will still toggle during an off-chip movx. however, ale will remain in a static mode when performing on-chip memory access. the default state of aleoff = 0 so ale toggles at a frequency of xtal/4. stop mode with ring startup stop mode without ring startup note: diagram assumes that the operation following stop requires less than 18ms to complete.
ds87c520/ds83c520 eprom/rom high-speed microcontrollers 22 of 43 peripheral overview the ds87c520/ds83c520 provide several of the most co mmonly needed peripheral functions in micro- computer-based systems. these new functions include a second serial port, pow er-fail reset, power-fail interrupt, and a programmable watchdog timer. these ar e described in the following paragraphs. more details are available in the high-speed microcontroller user?s guide. serial ports the ds87c520/ds83c520 provide a serial port (uart) that is identical to the 80c52. in addition it includes a second hardware serial por t that is a full duplicat e of the standard one. this port optionally uses pins p1.2 (rxd1) and p1.3 (txd1). it has duplicate control functions included in new sfr locations. both ports can operate simultaneously but can be at di fferent baud rates or even in different modes. the second serial port has similar contro l registers (scon1 at c0h, sbuf1 at c1h) to the original. the new serial port can only use timer 1 for timer generated baud rates. timer rate control there is one important difference between the ds87c520/ds83c520 and 8051 regarding timers. the original 8051 used 12 clocks per cycle for timers as well as for machine cycles. the ds87c520/ds83c520 architecture normally uses four cloc ks per machine cycle. however, in the area of timers and serial ports, the ds87c520/ds83c520 will defau lt to 12 clocks per cycle on reset. this allows existing code with real-time dependencies such as baud rates to operate properly. if an application needs higher speed timers or serial ba ud rates, the user can select individual timers to run at the 4-clock rate. the clock cont rol register (ckcon;8eh) determin es these timer speeds. when the relevant ckcon bit is a logic 1, the ds87c520/ds83c520 use 4 clocks per cycle to generate timer speeds. when the bit is a 0, the ds87c520/ds83c520 us e 12 clocks for timer speeds. the reset condition is a 0. ckcon.5 selects the speed of timer 2. ckc on.4 selects timer 1 and ckcon.3 selects timer 0. unless a user desires very fast timing, it is unnecessary to alter these bits. note that the timer controls are independent. power-fail reset the ds87c520/ds83c520 use a precision bandgap voltage reference to decide if v cc is out of tolerance. while powering up, the internal monitor circuit maintains a reset state until v cc rises above the v rst level. once above this level, the monitor enables the crystal oscillat or and counts 65,536 clocks. it then exits the reset state. this power-on reset (por) inte rval allows time for the oscillator to stabilize. a system needs no external components to generate a power-relate d reset. anytime v cc drops below v rst , as in power failure or a power drop, the monitor will generate and hold a reset. it occurs automatically, needing no action from the software. refer to the electrical specifications section for the exact value of v rst .
ds87c520/ds83c520 eprom/rom high-speed microcontrollers 23 of 43 power-fail interrupt the voltage reference that sets a precise reset thre shold also generates an optional early warning power- fail interrupt (pfi). when enabled by software, the processor will vector to program memory address 0033h if v cc drops below v pfw . pfi has the highest priority. the pfi enable is in the watchdog control sfr (wdcon?d8h). setting wdcon.5 to a logic 1 will enable the pfi. application software can also read the pfi flag at wdcon.4. a pfi condition sets th is bit to a 1. the flag is independent of the interrupt enable and software must manually clear it. watchdog timer to prevent software from losing control, th e ds87c520/ds83c520 include a programmable watchdog timer. the watchdog is a free-running timer that sets a flag if allowed to reach a preselected timeout. it can be (re)started by software. a typical application is to select the flag as a reset source. when the watchdog times out, it sets its flag, which generates reset. software must restart the timer before it reaches its timeout or the processor is reset. software can select one of four timeout values. the n, it restarts the timer and enables the reset function. after enabling the reset function, software must then restart the timer before its expiration or hardware will reset the cpu. both the watchdog reset enable and the watchdog restart control bits are protected by a ?timed access? circuit. this prevents errant software from accidentally clearing the watchdog. timeout values are precise since they are a f unction of the crystal frequency as shown in table 7. for reference, the tim e periods at 33mhz also are shown. the watchdog also provides a useful option for systems that do not require a reset circuit. it will set an interrupt flag 512 clocks before setti ng the reset flag. software can optionally enable this interrupt source. the interrupt is independent of the reset. a common use of the in terrupt is during debug, to show developers where the watchdog times out. this indi cates where the watchdog mu st be restarted by software. the interrupt also can se rve as a convenient time- base generator or can wake-up the processor from power saving modes. the watchdog function is controll ed by the clock control (ckcon -8eh), watchdog control (wdcon- d8h), and extended interrupt enable (eie-e8h ) sfrs. ckcon.7 and ck con.6 are wd1 and wd0 respectively and they se lect the watchdog timeout period as shown in table 7. table 7. watchdog timeout values wd1 wd2 interrupt timeout time (33 mhz) reset timeout time (33 mhz) 0 0 2 17 clocks 3.9718 ms 2 17 + 512 clocks 3.9874 ms 0 1 2 20 clocks 31.77 ms 2 20 + 512 clocks 31.79 ms 1 0 2 23 clocks 254.20 ms 2 23 + 512 clocks 254.21 ms 1 1 2 26 clocks 2033.60 ms 2 26 + 512 clocks 2033.62 ms as shown in table 7, the watchdog timer uses the crystal frequency as a tim e base. a user selects one of four counter values to determine the timeout. these clock counter lengths are 2 17 = 131,072 clocks; 2 20 = 1,048,576; 2 23 = 8,388,608 clocks; and 2 26 = 67,108,864 clocks. the times shown in table 7 are with a 33mhz crystal frequency. once the cou nter chai n has completed a full interrupt count, hardware
ds87c520/ds83c520 eprom/rom high-speed microcontrollers 24 of 43 will set an interrupt flag. regardless of whether the us er enables this interrupt, there are then 512 clocks left until the reset flag is set. software can enab le the interrupt and reset individually. note that the watchdog is a free running timer and does not require an enable. there are 5 control bits in special function registers that affect the watchdog timer and two status flags that report to the user. wdif (wdcon.3) is the interrupt flag that is set at timer termination when there are 512 clocks remaining until the rese t flag is set. wtrf (wdcon.2) is the flag that is set when the timer has completely timed out. this flag is normally associated with a cpu reset and allows software to determine the reset source. ewt (wdcon.1) is the enable for the watchdog timer reset function. rwt (wdcon.0) is the bit that software uses to restart the watchdog timer. setting th is bit restarts the timer for another full interval. application software must set this bit before the timeout. both of these bits are protected by timed access. as mentioned previously, wd1 and 0 (c kcon .7 and 6) select the timeout. the reset watchdog timer bit (wdcon.0) should be asserted prior to modifying the watchdog timer mode select bits (wd1, wd0) to avoid corruption of the watchdog count. finally, the user can enable the watchdog interrupt using ewdi (eie.4). the speci al function register map is shown above. interrupts the ds87c520/ds83c520 provide 13 interrupt sources with three priority levels. the power-fail interrupt (pfi) has the highest prior ity. software can assign high or lo w priority to other sources. all interrupts that are new to the 8051 fa mily, except for the pfi, have a lower natural priority than the originals. table 8. interrupt sources and priorities name function vector natural priority 8051/dallas pfi power-fail interrupt 33h 1 dallas int0 external interrupt 0 03h 2 8051 tf0 timer 0 0bh 3 8051 int1 external interrupt 1 13h 4 8051 tf1 timer 1 1bh 5 8051 scon0 ti0 or ri0 from serial port 0 23h 6 8051 tf2 timer 2 2bh 7 8051 scon1 ti1 or ri1 from serial port 1 3bh 8 dallas int2 external interrupt 2 43h 9 dallas int3 external interrupt 3 4bh 10 dallas int4 external interrupt 4 53h 11 dallas int5 external interrupt 5 5bh 12 dallas wdti watchdog timeout interrupt 63h 13 dallas
ds87c520/ds83c520 eprom/rom high-speed microcontrollers 25 of 43 timed-access protection it is useful to protect certain sfr bits from an accidental write operation. the timed access procedure stops an errant cpu from accidentally changing thes e bits. it requires that the following instructions precede a write of a protected bit. mov 0c7h, #0aah mov 0c7h, #55h writing an aah then a 55h to the timed access register (location c7h) opens a 3-cycle window for write access. the window allows software to modify a protec ted bit(s). if these instru ctions do not immediately precede the write operation, then the write will not take effect . the protected bits are: exif.0 bgs bandgap select wdcon.6 por power-on reset flag wdcon.1 ewt enable watchdog reset wdcon.0 rwt restart watchdog wdcon.3 wdif watchdog interrupt flag romsize.2 rms2 rom size select 2 romsize.1 rms1 rom size select 1 romsize.0 rms0 rom size select 0 eprom programming the ds87c520 follows standards for a 16kb eprom version in the 8051 family. it is available in a uv- erasable, ceramic-windowed package and in plastic packages for one-t ime user-programmable versions. the part has unique signature info rmation so programmers can suppo rt its specific eprom options. rom-specific features are described later in this data sheet. most commercially available device programmers will directly support dallas semiconductor microcontrollers. if your programmer does not, please contact the manufacturer for updated software. programming procedure the ds87c520 should run from a clock speed between 4mhz and 6mhz when being programmed. the programming fixture should apply address informati on for each byte to the address lines and the data value to the data lines. the control si gnals must be manipulated as shown in table 9. the diagram in table 5 shows the expected electrical connection fo r programming. note that the programm er must apply addresses in demultiplexed fashion to ports 1 and 2 with data on port 0. waveforms and timing are provided in the electrical specifications section. program the ds87c520 as follows: 1) apply the address value, 2) apply the data value, 3) select the programming option from table 9 using the control signals, 4) increase the voltage on v pp from 5v to 12.75v if writing to the eprom, 5) pulse the prog signal five times for eprom array and 25 tim es for encryption table, lock bits, and other eprom bits, 6) repeat as many times as necessary.
ds87c520/ds83c520 eprom/rom high-speed microcontrollers 26 of 43 table 9. eprom programming modes mode rst psen ale/prog ea / vpp p2.6 p2.7 p3 .3 p3.6 p3.7 program code data h l pl 12.75v l h h h h verify code data h l h h l l l h h program encryption array address 0-3fh h l pl 12.75v l h h l h lb1 h l pl 12.75v h h h h h lb2 h l pl 12.75v h h h l l program lock bits lb3 h l pl 12.75v h l h h l program option register address fch h l pl 12.75v l h h l l read signature or option registers 30, 31, 60 fch h l h h l l l l l table 10. ds87c520 eprom lock bits lock bits level lb1 lb2 lb3 protection 1 u u u no program lock. encrypted verify if encryption table was programmed. 2 p u u prevent movc instructions in external memory from reading program bytes in internal memory. ea is sampled and latched on reset. allow no further programming of eprom. 3 p p u level 2 plus no verify operation. also, prevent movx instructions in external memory from reading sram (movx) in internal memory. 4 p p p level 3 plus no external execution. security options the ds87c520 employs a standard three-level lock th at restricts viewing of the eprom contents. a 64- byte encryption array allows the authorized user to verify memory by presenting the data in encrypted form. lock bits the security lock consists of three lock bits. these b its select a total of four levels of security. higher levels provide increasing security but also limit application flexibility. table 10 shows the security settings. note that the programm er ca nnot directly read the st ate of the security lock. user software has access to this information as described in the memory section.
ds87c520/ds83c520 eprom/rom high-speed microcontrollers 27 of 43 encryption array the encryption array allows an authorized user to verify eprom without allowing the true memory to be dumped. during a verify, each byte is exclusive nor ed (xnor) with a byte in the encryption array. this results in a true representation of the epro m while the encryption is unprogrammed (ffh). once the encryption array is programmed in a non-ffh state, the verify value will be encrypted. for encryption to be effective, the encryption array must be unknown to th e party that is trying to verify memory. the entire eprom also should be a non-ffh state or the encryption array can be discovered. the encryption array is programmed as shown in table 9. note that the pr ogrammer cannot read the array. also note that the verify operation always uses the encryption array. the array has no im pact while ffh. simply programming the array to a non-ffh state will cause the encryption to function. other eprom options the ds87c520 has user selectable opti ons that must be set before be ginning software execution. these options use eprom bits rather than sfrs. program the eprom selectable options as shown in table 9. the option register sets o r reads these selections. the bits in the option contro l register have the following function: bits 7 to 4 reserved, program to a 1. bit 3 watchdog por default. set = 1; watc hdog reset function is disabled on power-up. set = 0; watchdog reset function is enabled automatically. bits 2 to 0 reserved. program to a 1. signature the signature bytes identify the product and progr amming revision to eprom programmers. this information is at programming addresses 30h, 31h, and 60h. address value meaning 30h dah manufacturer 31h 20h model 60h 01h extension
ds87c520/ds83c520 eprom/rom high-speed microcontrollers 28 of 43 figure 5. eprom progr amming configuration rom-specific features the ds83c520 supports a subset of the eprom features found on the ds87c520. security options lock bits the ds83c520 employs a lock that re stricts viewing of the rom conten ts. when set, the lock will prevent movc instructions in external memory from reading program bytes in internal memory. when locked, the ea pin is sampled and latched on reset. the lock setting is enabled or disabled when the devices are manufactured according to customer specifications. the lock bit cannot be read in software, and its status can only be determined by observing the operation of the device. encryption array the ds83c520 encryption array allows an authorized user to verify rom without allowing the true memory contents to be dumped. during a verify, each byte is exclusive nored (xnor) with a byte in the encryption array. this result s in a true represen tation of the rom while the encryption is unprogrammed (ffh) . once the encryption array is programmed in a non-ffh state, the encryption array is programmed (or optionall y left unprogrammed) when the devi ces are manufactured according to customer specifications.
ds87c520/ds83c520 eprom/rom high-speed microcontrollers 29 of 43 ds83c520 rom verification the ds83c520 memory contents can be verified us ing a standard eprom programmer. the memory address to be verified is placed on the pins shown in figure 5, and the programming control pins are set to the lev els shown in table 9. the data at that loca tion is then asserted on port 0. ds83c520 signature the signature bytes identify the ds83c520 to eprom programmers. this information is at programming addresses 30h, 31h, and 60h. because mask rom devices are not programmed in device programmers, most designers will find little use for th e feature, and it is incl uded only for compatibility. address value meaning 30h dah manufacturer 31h 21h model 60h 01h extension
ds87c520/ds83c520 eprom/rom high-speed microcontrollers 30 of 43 absolute maxi mum ratings voltage range on any pin relative to ground?????????????????????.-0.3v to (v cc + 0.5v) voltage range on v cc relative to ground..?????????????????????????.-0.3v to +6.0v operating temperature range??????????????????????????????.-40c to +85c storage temperature??????????????????????????????????-55c to +125c soldering temperature..????????????????????? ..see ipc/jedec j-std-020 specification this is a stress rating only and functional operation of the devic e at these or any other conditi ons above those indicated in t he operation sections of this specification is not implied. exposure to absolute maximum rating co nditions for extended periods of time may affect reliability. dc electrical characteristics (v cc = 4.5v, t a = -40c to +85c.) (note 1) parameter symbol min typ max units notes supply voltage v cc 4.5 5.0 5.5 v 2 ds87c520 4.25 4.38 4.5 power-fail warning ds83c520 v pfw 4.25 4.38 4.55 v 2 ds87c520 4.0 4.13 4.25 minimum operating voltage ds83c520 v rst 4.0 4.13 4.275 v 2 supply current active mode at 33mhz i cc 30 45 ma 3 supply current idle mode at 33mhz i idle 15 25 ma 4 supply current stop mode, bandgap disabled (0c to +70c) 1 100 ? a 5 supply current stop mode, bandgap disabled (-40c to +85c) i stop 1 150 ? a 5 supply current stop mode, bandgap enabled (0c to +70c) 50 170 a 5 supply current stop mode, bandgap enabled (-40c to +85c) i spbg 50 195 ? a 5 input low level v il -0.3 +0.8 v 2 input high level (except xtal1 and rst) v ih 2.0 v cc + 0.3 v 2 input high level xtal1 and rst v ih2 3.5 v cc + 0.3 v 2 output low voltage, ports 1 and 3 at i ol = 1.6ma v ol1 0.15 0.45 v 2 output low voltage ports 0 and 2, ale, psen at i ol = 3.2ma v ol2 0.15 0.45 v 2 output high voltage ports 1, 2, 3, ale, psen at i oh = -50 a v oh1 2.4 v 2, 7 output high voltage ports 1, 2, 3 at i oh = -1.5ma v oh2 2.4 v 2, 8 output high voltage port 0, 2, ale, psen in bus mode at i oh = -8ma v oh3 2.4 v 2, 6 input low current ports 1, 2, 3 at 0.45v i il -70 a 12
ds87c520/ds83c520 eprom/rom high-speed microcontrollers 31 of 43 dc electrical characte ristics (continued) (v cc = 4.5v, t a = -40c to +85c.) parameter symbol min typ max units notes transition current from 1 to 0 ports 1, 2, 3 at 2v i tl -800 a 9 input leakage port 0, and ea pins, i/o mode i l -10 +10 a 11 input leakage port 0, bus mode i l -300 +300 a 10 rst pulldown resistance r rst 50 200 k ? note 1: all parameters apply to both commercial and industrial temperature operation, unless otherwise noted. note 2: all voltages are referenced to ground. note 3: active current measured with 33mhz clock source on xtal1, v cc = rst = 5.5v, other pins disconnected. note 4: idle mode current measured with 33mhz clock source on xtal1, v cc = 5.5v, rst at ground, other pins disconnected. note 5: stop mode current measured with xtal1 and rst grounded, v cc = 5.5v, all other pins disconnected. note 6: when addressing external memory. this specification only applies to the first clock cycle following the transition. note 7: rst = v cc . this condition mimics operation of pins in i/o mode. port 0 is tri-stated in reset and when at a logic high state during i/o mode. note 8: during a 0-to-1 transition, a one-shot drives the ports hard for two clock cycles. this measurement reflects port in transition mode. note 9: ports 1, 2, and 3 source transition current when being pulled down externally. it reaches its maximum at approximately 2v. note 10: 0.45 < v in < v cc . not a high-impedance input. this port is a weak address holding latch in bus mode. peak current occurs near the input transition poi nt of the latch, approximately 2v. note 11: 0.45 < v in < v cc . rst = v cc . this condition mimics operation of pins in i/o mode. note 12: this is the current required from an external circuit to hold a logic low level on an i/o pi n while the corresponding port latch bit is set to 1. this is only the current required to hold the low level; transitions from 1 to 0 on an i/o pin will also have to overcome the transition current. typical i cc vs. frequency
ds87c520/ds83c520 eprom/rom high-speed microcontrollers 32 of 43 ac electrical characteristics (note 1) 33 mhz variable clock parameter symbol min max min max units external oscillator 0 33 0 33 oscillator frequency external crystal 1/t clcl 1 33 1 33 mhz ale pulse width t lhll 40 1.5t clcl -5 ns port 0 address valid to ale low t avll 10 0.5t clcl -5 ns address hold after ale low t llax1 (note 2) (note 2) ns ale low to valid instruction in t lliv 43 2.5t clcl -33 ns ale low to psen low t llpl 4 0.5t clcl -11 ns psen pulse width t plph 55 2t clcl -5 ns psen low to valid instruction in t pliv 37 2t clcl -24 ns input instruction hold after psen t pxix 0 0 ns input instruction float after psen t pxiz 26 t clcl -5 ns port 0 address to valid instruction in t aviv1 59 3t clcl -32 ns port 2 address to valid instruction in t aviv2 68 3.5t clcl -38 ns psen low to address float t plaz (note 2) (note 2) ns note 1: all parameters apply to both commercial and industrial te mperature range operation unless otherwise noted. specifications to -40c are guaranteed by design and are not production test ed. ac electrical characteristics are not 100% tested, but are characterized and guaranteed by design. all signals charac terized with load capacitance of 80pf except port 0, ale, psen , rd , and wr with 100pf. interfacing to memory devi ces with float time s (turn off times) over 25ns may cause contention. this will not damage the parts, but will c ause an increase in operating current. specifications assume a 50% duty cycle for the oscillator. po rt 2 and ale timing will change in relation to duty cycle variation. note 2: address is driven strongly until ale falls, and is t hen held in a weak latch until overdriven externally.
ds87c520/ds83c520 eprom/rom high-speed microcontrollers 33 of 43 movx characteristics variable clock parameter symbol min max units stretch 1.5t clcl -5 t mcs =0 data access ale pulse width t lhll2 2t clcl -5 ns t mcs >0 0.5t clcl -5 t mcs =0 port 0 address valid to ale low t avll2 t clcl -5 ns t mcs >0 0.5t clcl -10 t mcs =0 address hold after ale low for movx write t llax2 t clcl -7 ns t mcs >0 2t clcl -5 t mcs =0 rd pulse width t rlrh t mcs -10 ns t mcs >0 2t clcl -5 t mcs =0 wr pulse width t wlwh t mcs -10 ns t mcs >0 2t clcl -22 t mcs =0 rd low to valid data in t rldv t mcs -24 ns t mcs >0 data hold after read t rhdx 0 ns ? t clcl -5 t mcs =0 data float after read t rhdz 2t clcl -5 ns t mcs >0 2.5t clcl -31 t mcs =0 ale low to valid data in t lldv t mcs +t clcl -26 ns t mcs >0 3t clcl -29 t mcs =0 port 0 address to valid data in t avdv1 t mcs +2t clcl - 29 ns t mcs >0 3.5t clcl -37 t mcs =0 port 2 address to valid data in t avdv2 t mcs +2.5t clcl - 37 ns t mcs >0 0.5t clcl -10 0.5t clcl +5 t mcs =0 ale low to rd or wr low t llwl t clcl -5 t clcl +5 ns t mcs >0 t clcl -9 t mcs =0 port 0 address to rd or wr low t avwl1 2t clcl -7 ns t mcs >0 1.5t clcl -17 t mcs =0 port 2 address to rd or wr low t avwl2 2.5t clcl -16 ns t mcs >0 data valid to wr transition t qvwx -6 ns ? t clcl -5 t mcs =0 data hold after write t whqx 2t clcl -6 ns t mcs >0 rd low to address float t rlaz (note 2) ns ? -4 10 t mcs =0 rd or wr high to ale high t whlh t clcl -5 t clcl +5 ns t mcs >0 note 1: t mcs is a time period related to the stretch memory cycl e selection. the following table shows the value of t mcs for each stretch selection. note 2: address is driven strongly until ale falls, and is t hen held in a weak latch until overdriven externally.
ds87c520/ds83c520 eprom/rom high-speed microcontrollers 34 of 43 movx characteristi cs (continued) m2 m1 m0 movx cycles t mcs 0 0 0 2 machine cycles 0 0 0 1 3 machine cycles (default) 4 t clcl 0 1 0 4 machine cycles 8 t clcl 0 1 1 5 machine cycles 12 t clcl 1 0 0 6 machine cycles 16 t clcl 1 0 1 7 machine cycles 20 t clcl 1 1 0 8 machine cycles 24 t clcl 1 1 1 9 machine cycles 28 t clcl external clock characteristics parameter symbol min typ max units clock high time t chcx 10 ns clock low time t clcx 10 ns clock rise time t clcl 5 ns clock fall time t chcl 5 ns serial port mode 0 timing characteristics parameter symbol conditions min typ max units sm2 = 0, 12 clocks per cycle 12t clcl serial port clock cycle time t xlxl sm2 = 1, 4 clocks per cycle 4t clcl ns sm2 = 0, 12 clocks per cycle 10t clcl output data setup to clock rising t qvxh sm2 = 1, 4 clocks per cycle 3t clcl ns sm2 = 0, 12 clocks per cycle 2t clcl output data hold from clock rising t xhqx sm2 = 1, 4 clocks per cycle t clcl ns sm2 = 0, 12 clocks per cycle t clcl input data hold after clock rising t xhdx sm2 = 1, 4 clocks per cycle t clcl ns sm2 = 0, 12 clocks per cycle 11t clcl clock rising edge to input data valid t xhdv sm2 = 1, 4 clocks per cycle 3t clcl ns
ds87c520/ds83c520 eprom/rom high-speed microcontrollers 35 of 43 explanation of ac symbols in an effort to remain compa tible with the original 8051 famil y, the ds87c520 and ds83c520 specify the same parameters as such devi ces, using the same symbols. for completeness, the following is an explanation of the symbols. t time a address c clock d input data h logic level high l logic level low i instruction p psen q output data r rd signal v valid w wr signal x no longer a valid logic level z tri-state power-cycle timing characteristics parameter symbol min typ max units notes cycle startup time t csu 1.8 ms 1 power-on reset delay t por 65,536 t clcl 2 note 1: startup time for crystals varies with load capacitance and manufacturer. time shown is for an 11.0592mhz crystal manufactured by fox. note 2: reset delay is a synchronous counter of crystal oscillat ions after crystal startup. counting begins when the level on the xtal1 pin meets the v ih2 criteria. at 33mhz, this time is 1.99ms. eprom programming and verification (v cc = 4.5v to 5.5v, t a = + 21? c to +27c.) parameter symbol min typ max units notes programming voltage v pp 12.5 13.0 v 1 programming supply current i pp 50 ma oscillator frequency 1/t clcl 4 6 mhz address setup to prog low t avgl 48t clcl address hold after prog t ghax 48 t clcl data setup to prog low t dvgl 48 t clcl data hold after prog t ghdx 48 t clcl enable high to v pp t ehsh 48 t clcl v pp setup to prog low t shgl 10 s v pp hold after prog t shgl 10 s prog width t glgh 90 110 s address to data valid t avqv 48 t clcl enable low to data valid t elqv 48 t clcl data float after enable t ehqz 0 48 t clcl prog high to prog low t ghgl 10 s note 1: all voltages are referenced to ground.
ds87c520/ds83c520 eprom/rom high-speed microcontrollers 36 of 43
ds87c520/ds83c520 eprom/rom high-speed microcontrollers 37 of 43 external program memory read cycle external data memory read cycle t avll2
ds87c520/ds83c520 eprom/rom high-speed microcontrollers 38 of 43 external data memory write cycle data memory write with stretch = 1 2
ds87c520/ds83c520 eprom/rom high-speed microcontrollers 39 of 43 data memory write with stretch = 2 four cycle data memory write stretch value=2 external clock drive
ds87c520/ds83c520 eprom/rom high-speed microcontrollers 40 of 43 serial port mode 0 timing serial port 0 (synchronous mode) high speed oper ation sm2=1=>txd clock=xtal/4
ds87c520/ds83c520 eprom/rom high-speed microcontrollers 41 of 43 power-cycle timing eprom programming and verification waveforms
ds87c520/ds83c520 eprom/rom high-speed microcontrollers 42 of 43 package information for the latest package outline information, go to www.maxim-ic.com/packages . package type package code document no. 44 tqfp c44+3 21-0293 40 cdip j40-5 21-0384 40 pdip p40+4 21-0044 44 plcc q44+9 21-0049
ds87c520/ds83c520 eprom/rom high-speed microcontrollers 43 of 43 data sheet revi sion summary revision description 110195 prelimin ary release. 022097 1) update ale pin description. 2) add note pertaining to erasure window. 3) add note pertaining to internal movx sram. 4) change note 10 from rst = 5.5v to rst = v cc . 5) change serial port mode 0 timing diagram label from t qvxl to t qvxh . 070698 1) update pmm operating current estimates 2) added note to clarify i il specification. 3) added note to prevent accidental co rruption of watchdog timer count while changing counter length. 4) changed minimum oscillator frequency to 1mhz when using external crystal. 5) changed rst pulldown resistance from 170k ?? to 200k ?? maximum. 6) corrected ?data memory write with stretch? diagra ms to show falling edge of ale coincident with rising edge of c3 clock. 070300 1) corrected p0 pinout description for tqfp package. 2) clarified point at which reset delay begins. 040104 1) removed ?preliminary? status. 2) soldering temperature parameter now references jedec specification. 3) added note to absolute maximums clarifying voltages referenced to ground. 4) updated i cc , i idle , i stop , i spbg , i il , and i tl to incorporate errata conditions. 5) added note clarifying dc electrical test conditions. 6) added note clarifying v oh3 specification applies to first clock cycle following the transition. 7) updated ac and movx electrical character istics with final characterization values. added t avll2 specification and corrected movx timing diagrams to show t avll2 instead of t avll . 070505 1) added pb-free/rohs-compliant part numbers to ordering information table. 2) deleted the ?a? from the ipc/jedec j-std-020 specification in the absolute maximum ratings. 091605 1) in dc electrical characteristics table, added separate specification for ds83c520 v pfw . 2) changed v rst max to from 4.25v to 4.275v for ds83c520 value. 022207 1) (page 30) in the absolute maximum ratings table, changed the operating range from 0 ? c to +70 ? c to -40 ? c to +85 ? c (correction for typographical error; this does not reflect a change in the device or device testing). 2) (page 33) in the movx characteristics table, added note 2 and changed t rlaz max from note 1 to note 2. 42 of 42 maxim/dallas semiconductor cannot assume res ponsibility for use of any circuitry other than circuitry entirely embodied in a ma xim/dallas semiconductor product. no circuit patent licenses are implied. maxim/dallas semiconductor reserves the right to change the circuitry and specifications w ithout notice at any time. maxim integrated products, 120 san gabriel drive, sunnyvale, ca 94086 408-737-7600 ? 2007 maxim integrated products the maxim logo is a registered trademark of maxim integrated products, inc. the dallas logo is a registered trademark of dallas semiconductor corporation.


▲Up To Search▲   

 
Price & Availability of DS83C52007

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X